package com.dbsync.exception;


/**
 * 同步线程异常处理类
 */
public class DbsyncUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler {
    private boolean flag = false;

    private String reason;

    public void uncaughtException(Thread t, Throwable e) {
        this.reason = e.toString();
        this.flag = true;
    }

    public boolean isError(){
        return this.flag;
    }

    public String getReason(){
        return this.reason;
    }
}
